import { Gender } from '@app/types/enums';
import { ApiPropertyOptional } from '@nestjs/swagger';
import { IsEmail, IsPhoneNumber } from 'class-validator';

export class CreateProfileDto {
  @ApiPropertyOptional({ enum: [Gender.UNKNOWN, Gender.MALE, Gender.FFEMALE], description: '性别', enumName: 'Gender' })
  geneder?: Gender;

  @ApiPropertyOptional({ description: '头像' })
  avatar?: string;

  @ApiPropertyOptional({ description: '邮箱' })
  @IsEmail()
  email?: string;

  @ApiPropertyOptional({ description: '电话' })
  @IsPhoneNumber(undefined, { message: '电话号码格式不正确' })
  phone?: string;

  @ApiPropertyOptional({ description: '昵称' })
  nickname?: string;

  @ApiPropertyOptional({ description: '描述' })
  description?: string;
}
